<template>
	<view class="my-music">
		<view class="flex flex-col justify-center align-center">
			<image src="@/static/imgs/my-music.png" mode=""></image>
		</view>
		<view class="my-music-login  ml-10">
			<view class="text-xl">请登录后查看管理您收藏的私房音乐，方便随时随地收听!</view>
			<view class="mt-5"><t-btn color="primary" @click="goLogin">马上登录</t-btn></view>
		</view>
	</view>
</template>

<script>
	import {
		mapState,
		mapMutations,
		mapActions
	} from 'vuex' //引入mapState
	export default {
		name: "my-music",
		data() {
			return {

			};
		},
		mounted() {
			if(this.hasLogin){
				this.$emit('goWhat','user')
			}
		},
		computed:{
			...mapState({
				hasLogin: (state) => state.user.hasLogin,
				login_username: (state) => state.user.username
			}),
		},
		methods:{
			goLogin(){
				this.$emit('goWhat','user')
			}
		}
	}
</script>

<style>
	.my-music {
		display: flex;
		justify-content: center;
		align-items: center;
		color: #606266;
		margin-right: 2rem;
		/* border-right: 1px solid #CCCCCC; */
		/* margin-top: 5rem; */
		width: 100%;
		height: 70vh;
	}

	.my-music-login {
		
	}
</style>
